package net.hn.hnms.biz.intelligence.vo;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 存放井下人员、带班领导的变化曲线
 */
@Data
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE)
public class ChartPersonCountVO {

    /**
     * 横坐标：小时 hh:00
     * 或 天 yyyy-mm-dd
     * 或 天-小时 yyyy-mm-dd hh:00:00
     */
    @ApiModelProperty("x轴")
    private List<String> xName;

    /**
     * 井下人数
     */
    @ApiModelProperty("井下人数")
    private List<Integer> personCount;

    /**
     * 带班领导数
     */
    @ApiModelProperty("带班领导数")
    private List<Integer> leaderCount;

    /**
     * 特殊工种
     */
    @ApiModelProperty("特殊工种")
    private List<Integer> specialCount;

    /**
     * 上传核定人数
     */
    @ApiModelProperty("上传核定人数")
    private Integer jxrySpecifyNum;
    /**
     * 规定核定人数
     */
    @ApiModelProperty("规定核定人数")
    private Integer mineMaxNum;




    public ChartPersonCountVO() {
        xName = new ArrayList<>();
        personCount = new ArrayList<>();
        leaderCount = new ArrayList<>();
        specialCount = new ArrayList<>();
    }

    public ChartPersonCountVO(List<String> xName, List<Integer> personCount, List<Integer> leaderCount) {
        this.xName = xName;
        this.personCount = personCount;
        this.leaderCount = leaderCount;
    }

    /**
     * 由PersonCountChartDTO转置生成
     *
     * @param personCountChartDTOList
     */
//    public ChartPersonCountVO(List<PersonCountChartBO> personCountChartDTOList, Integer jxrySpecifyNum, Integer mineMaxNum) {
//        this.jxrySpecifyNum=jxrySpecifyNum;
//        this.mineMaxNum=mineMaxNum;
//        xName = new ArrayList<>();
//        personCount = new ArrayList<>();
//        leaderCount = new ArrayList<>();
//        specialCount = new ArrayList<>();
//        personCountChartDTOList.forEach(
//                x -> {
//                    xName.add(x.getDataTime());
//                    personCount.add(x.getPersonCount());
//                    leaderCount.add(x.getLeaderCount());
//                    specialCount.add(x.getSpecialCount());
//                }
//        );
//    }

}
